package com.cg.mapper;

import com.cg.entity.Resume;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ResumeMapper {
    int insert(Resume resume);
    
    @Select("SELECT * FROM resume WHERE id = #{id}")
    Resume selectById(@Param("id") Long id);
    
    @Select("SELECT * FROM resume WHERE user_id = #{userId} ORDER BY create_time DESC")
    List<Resume> selectAllByUserId(@Param("userId") Long userId);
}


